﻿using Anke.SHManage.MSSQLDAL.FixedAssetsDAL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Anke.SHManage.BLL.FixedAssetsBLL
{
    public class FixedAssetsScrapBLL
    {
        /// <summary>
        /// 获取固定资产报废申请单列表
        /// </summary>
        /// <param name="pageSize"></param>
        /// <param name="pageIndex"></param>
        /// <param name="assetTypeID"></param>
        /// <param name="materialID"></param>
        /// <param name="assetID"></param>
        /// <param name="DateStart"></param>
        /// <param name="DateEnd"></param>
        /// <returns></returns>
        public object GetScrapList(int pageSize, int pageIndex, string assetTypeID, string materialID, string assetID, DateTime DateStart, DateTime DateEnd)
        {
            return new FixedAssetsScrapDAL().GetScrapList(pageSize, pageIndex, assetTypeID, materialID, assetID, DateStart, DateEnd);
        }

        /// <summary>
        /// 根据编码获取报废数据
        /// </summary>
        /// <param name="Code"></param>
        /// <returns></returns>
        public Model.FixedAssetsModel.FIXED_ScrapInfo GetScrapData(string Code)
        {
            return new FixedAssetsScrapDAL().GetScrapData(Code);
        }

        /// <summary>
        /// 新增报废
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        public bool InsertEditPageData(Model.FixedAssetsModel.FIXED_ScrapInfo info)
        {
            return new FixedAssetsScrapDAL().InsertEditPageData(info);
        }

        /// <summary>
        /// 报废修改
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        public bool UpdateEditPageData(Model.FixedAssetsModel.FIXED_ScrapInfo info)
        {
            return new FixedAssetsScrapDAL().UpdateEditPageData(info);
        }

        /// <summary>
        /// 验证该资产是否已有报废单
        /// </summary>
        /// <param name="guid"></param>
        /// <returns></returns>
        public bool IsHaveCurrentData(Guid code)
        {
            return new FixedAssetsScrapDAL().IsHaveCurrentData(code);
        }
    }
}
